package cn.edu.hunau.java.week01.day03;

import org.junit.Test;

public class ArrayEx01Test {
    @Test

    public void testMinValue(){
        int[] arr={54,45,6,3,344,56,32,78,2,9};
        int min=arrayMinValue(arr);
        System.out.println(min);
    }

    public int arrayMinValue(int[] arr){
        int min=arr[0];
        for(int i=0;i<arr.length;i++){
            if(arr[i]<min){
                min=arr[i];
            }
        }
        return min;
    }
}
